package com.wx.mapper;

import com.wx.common.MyMapper;
import com.wx.domain.dto.AgreementDto;
import com.wx.domain.vo.NurseAgreementVo;
import com.wx.domain.vo.PatientAgreementVo;
import com.wx.entity.SysAgreement;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Optional;

/**
 * <p>Title:      SysAgreementController. </p>
 * <p>Description 协议签署表 </p>
 * <p>Copyright: Copyright (c) 2016</p>
 * <p>Company:    医百科技有限公司 </p>
 *
 * @author         yangwensheng@100doc.com.cn
 * @since      2021-03-25 10:08:31
 */
@Mapper
@Component
public interface SysAgreementMapper extends MyMapper<SysAgreement> {

    Optional<SysAgreement> selectByKeyOptional(Object key);

    int updateByUserId(SysAgreement deleteAgreement);

    List<SysAgreement> batchQueryByPatientIds(@Param("patientIds") List<String> patientIds, @Param("userType") Integer userType);

    List<PatientAgreementVo> listPageWithPatient(@Param("param") AgreementDto param);

    List<NurseAgreementVo> listPageWithNurse(@Param("param") AgreementDto param);
}
